<template>
  <div>
      <div style="width:280px;margin:40px auto">
           <el-button @click="fasong" type="success" plain>测试封装axios</el-button>
      </div>
   
  </div>
</template>

<script>
import axios from "@/utils/request2";
export default {
  methods: {
    fasong() {
      let data = {
        businessId: "3",
        businessNumber: 1,
        check_conclution: "",
        check_content: "",
        check_date: "2020-12-11",
        check_value: "",
        content: "",
        customerNumber: 0,
        level: 0,
        marketNumber: 1,
        national_limit: "",
        productId: "2633",
        productName: "上海青",
        reason: "111",
        reasonType: 1,
        recallType: 0,
        stallId: 2,
        thresholdValue: "1",
        title: "",
        tracebackDate: "2020-05-10",
      };
      axios({
        url: `api/v1/recall/recallMessage`,
        method: "POST",
        data,
      })
        .then((data) => {
          // console.log(data);
          if (data.status == 200) {
            this.$message({
              message: data.data.data,
              type: "success",
            });
          } else {
            this.$message({
              message: data.data.message,
              type: "error",
            });
          }
        })
        .catch((err) => {
          console.log(err);
        });
    },
    click(){
        if (this.$store.state.vuex.part1.name == "张"){
          console.log("做a逻辑");
        }else{
          console.log("做b逻辑");
        }
    }
  },
};
</script>

<style>
</style>